class emiconfig::vomses {
  class{"voms::alice":}
  class{"voms::atlas":}
  class{"voms::cms":}
  class{"voms::dteam":}
  class{"voms::lhcb":}
  class{"voms::ops":}
  class{"voms::biomed":}
  class{"voms::esr":}
  # class{"voms::biomed":}

# New for 2024 for IAM 
  $iam_pkgs=[
      "wlcg-iam-lsc-alice",
      "wlcg-iam-lsc-atlas",
      "wlcg-iam-lsc-cms",
      "wlcg-iam-lsc-lhcb",
      "wlcg-iam-lsc-dteam",
      "wlcg-iam-lsc-ops",
      "wlcg-iam-vomses-alice",
      "wlcg-iam-vomses-atlas",
      "wlcg-iam-vomses-cms",
      "wlcg-iam-vomses-lhcb",
      "wlcg-iam-vomses-dteam",
      "wlcg-iam-vomses-ops",
  ]
  package{ $iam_pkgs:
    ensure  => "installed",
    require => Yumrepo['site'],
  }
# before 2024


  voms::client{'enmr.eu':
    servers => [
      {
        server => 'voms-02.pd.infn.it',
          port => '15014',
            dn => '/DC=org/DC=terena/DC=tcs/C=IT/L=Frascati/O=Istituto Nazionale di Fisica Nucleare/CN=voms-02.pd.infn.it',
         ca_dn => '/C=NL/ST=Noord-Holland/L=Amsterdam/O=TERENA/CN=TERENA eScience SSL CA 3',
      },
      {
        server => 'voms2.cnaf.infn.it',
          port => '15014',
            dn => '/C=IT/O=INFN/OU=Host/L=CNAF/CN=voms2.cnaf.infn.it',
         ca_dn => '/C=IT/O=INFN/CN=INFN Certification Authority',
      },
    ]
  }
  voms::client{'vo.france-asia.org':
        servers  => [{server => 'cclcgvomsli01.in2p3.fr',
                   port   => '15019',
                   dn    => '/O=GRID-FR/C=FR/O=CNRS/OU=CC-IN2P3/CN=cclcgvomsli01.in2p3.fr',
                   ca_dn => '/C=FR/O=CNRS/CN=GRID2-FR',
                  }]
  }
  voms::client{'bes':
        servers  => [{server => 'voms.ihep.ac.cn',
                   port   => '15001',
                   dn    => '/C=CN/O=HEP/OU=CC/O=IHEP/CN=voms.ihep.ac.cn',
                   ca_dn => '/C=CN/O=HEP/CN=Institute of High Energy Physics Certification Authority',
                  }]
  }
  voms::client{'herd':
        servers  => [
                      #{server => 'voms.ihep.ac.cn',
                      #   port   => '15010',
                      #   dn    => '/C=CN/O=HEP/OU=CC/O=IHEP/CN=voms.ihep.ac.cn',
                      #   ca_dn => '/C=CN/O=HEP/CN=Institute of High Energy Physics Certification Authority',
                      #},
                      {server => 'herd-iam.ihep.ac.cn',
                         port   => '8443',
                         dn    => '/C=CN/O=HEP/O=IHEP/OU=CC/CN=herd-iam.ihep.ac.cn',
                         ca_dn => '/C=CN/O=HEP/CN=Institute of High Energy Physics Certification Authority',
                      }
                    ]
  }
  voms::client{'cepc':
        servers  => [{server => 'voms.ihep.ac.cn',
                   port   => '15005',
                   dn    => '/C=CN/O=HEP/OU=CC/O=IHEP/CN=voms.ihep.ac.cn',
                   ca_dn => '/C=CN/O=HEP/CN=Institute of High Energy Physics Certification Authority',
                  }]
  }
  voms::client{'ilc':
        servers  => [{server => 'grid-voms.desy.de',
                   port   => '15110',
                   dn    => '/DC=org/DC=terena/DC=tcs/C=DE/ST=Hamburg/O=Deutsches Elektronen-Synchrotron DESY/CN=grid-voms.desy.de',
                   ca_dn => '/C=NL/O=GEANT Vereniging/CN=GEANT eScience SSL CA 4',
                  }]
  }
  voms::client{'juno':
        servers  => [
                  {server => 'voms.ihep.ac.cn',
                   port   => '15008',
                   dn    => '/C=CN/O=HEP/OU=CC/O=IHEP/CN=voms.ihep.ac.cn',
                   ca_dn => '/C=CN/O=HEP/CN=Institute of High Energy Physics Certification Authority',
                  },
                  {server => 'lcgvoms02.jinr.ru',
                   port   => '15008',
                   dn    => '/C=RU/O=RDIG/OU=hosts/OU=jinr.ru/CN=lcgvoms02.jinr.ru',
                   ca_dn => '/C=RU/O=RDIG/CN=Russian Data-Intensive Grid CA',
                  },
                  {server => 'voms-juno.cloud.cnaf.infn.it',
                   port   => '15008',
                   dn    => '/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/CN=voms-juno.cloud.cnaf.infn.it',
                   ca_dn => '/C=NL/O=GEANT Vereniging/CN=GEANT eScience SSL CA 4',
                  }
                  ]
  }
  voms::client{'belle':
        servers  => [{server => 'voms.cc.kek.jp',
                   port   => '15020',
                   dn    => '/C=JP/O=KEK/OU=CRC/CN=host/voms.cc.kek.jp',
                   ca_dn => '/C=JP/O=KEK/OU=CRC/CN=KEK GRID Certificate Authority',
                  },
		 {server => 'grid-voms.desy.de',
                   port   => '15020',
                   dn    => '/DC=org/DC=terena/DC=tcs/C=DE/ST=Hamburg/O=Deutsches Elektronen-Synchrotron DESY/CN=grid-voms.desy.de',
                   ca_dn => '/C=NL/O=GEANT Vereniging/CN=GEANT eScience SSL CA 4',
                  }
		  ]
  }
  voms::client{'muoncoll.infn.it':
    servers => [
      {
        server => 'voms-02.pd.infn.it',
          port => '15022',
            dn => '/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/CN=voms-02.pd.infn.it',
         ca_dn => '/C=NL/O=GEANT Vereniging/CN=GEANT eScience SSL CA 4',
      },
      {
        server => 'voms2.cnaf.infn.it',
          port => '15022',
            dn => '/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/OU=CNAF/CN=voms2.cnaf.infn.it',
         ca_dn => '/C=NL/O=GEANT Vereniging/CN=GEANT eScience SSL CA 4',
      },
    ]
  }
}
